﻿using System;

namespace state
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");

            var context = new Context(new ConcreteStateA());
            Console.WriteLine("Input [Esc] Key Quit!");
            do
            {
                Console.WriteLine($"State: {context.State}");

                context.Request();
                var keyInfo = Console.ReadKey();
                if (keyInfo.Key == ConsoleKey.Escape)
                {
                    Console.WriteLine("Quit!");
                    break;
                }
            } while (true);

        }
    }
}
